package com.hgz.sbj.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hgz.sbj.mapper.TFxItemMapper;
import com.hgz.sbj.mapper.TFxTextMapper;
import com.hgz.sbj.model.TFxItem;
import com.hgz.sbj.model.TFxItemExample;
import com.hgz.sbj.model.TFxText;

@Service
public class TFxItemService {

	@Autowired
	private TFxItemMapper tFxItemMapper;
	
	@Autowired
	private TFxTextMapper tFxTextMapper;
	
	public int getCount(){
		return tFxItemMapper.countByExample(new TFxItemExample());
	}
	
	public List<TFxItem> getBeans(){
		return tFxItemMapper.selectByExample(new TFxItemExample());
	}
	
	/**
	 * 根据fxId获取详细记录
	 * @param fxId
	 * @return
	 * @throws Exception
	 */
	public TFxText getFxText(String fxId) throws Exception{
		return tFxTextMapper.findText(fxId);
	}
}
